//
//  TYLifeSystemAbstractClass.m
//  AngerDragon
//
//  Created by gaotime_macbook_2 on 11-12-13.
//  Copyright 2011 __MyCompanyName__. All rights reserved.
//

#import "TYLifeSystemAbstractClass.h"


@implementation TYLifeSystemAbstractClass

@synthesize m_n_remain_life;
@synthesize m_n_limit_life;
@synthesize m_b_is_need_show_bones;

- (id) init {
	
	if ((self = [super init]))
	{
		CCLOG(@"%@: %@", NSStringFromSelector(_cmd), self);
		
		m_n_remain_life = 0;
		m_n_limit_life = 0;
		m_b_is_need_show_bones = NO;
	}
	
	return self;
}

- (void) dealloc {
	CCLOG(@"%@: %@", NSStringFromSelector(_cmd), self);

	[super dealloc];
}


/// 释放当前对象(这里只是调用具体实现类的 dealloc方法)
- (void) deallocMe {
	[self dealloc];
}
/// 设置当前生命的最大值
- (void) setLifeMaxValue:(NSInteger) a_n_life_max_value {
	m_n_limit_life = a_n_life_max_value;
}
/// 减少生命值
- (void) reduceLifeValue:(NSInteger) a_n_value {
	m_n_remain_life -= a_n_value;
}
/// 判断是否已经死亡
- (BOOL) isDead {
	if (m_n_remain_life <= 0) {
		return YES;
	} else {
		return NO;
	}
}
/// 设置是否需要在屏幕上保留其尸体的标志位
- (void) setIsNeedShowBonesMark:(BOOL) a_b_is_need_show_bones {
	m_b_is_need_show_bones = a_b_is_need_show_bones;
}
/// 获取是否需要保留其尸体的标志位
- (BOOL) isNeedShowBons {
	return m_b_is_need_show_bones;
}

@end
